<template>
  <div class="centericons">
    <div class="icon" v-for="item of  list" :key="item.id">
      <div class='icon-img'  >
        <img class='icon-img-content' :src='item.imgUrl' />
        <p class="icon-desc">{{item.desc}}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'SecondCenter',
  props: {
    list: Array
  },
  data () {
    return {
      centerOption: {
        autoplay: false
      }
    }
  }
}
</script>

<style lang="stylus" scoped>
  @import '~styles/varibles.styl'
  @import '~styles/mixins.styl'
  .centericons
    margin-top: .1rem
    .icon
      position: relative
      overflow: hidden
      float: left
      width: 50%
      height: 0
      padding-bottom: 20%
      .icon-img
        position: absolute
        top: 0
        left: 0
        right: .144rem
        bottom: 0
        box-sizing: border-box
        padding: .2rem
        .icon-img-content
          display: inline //默认。此元素会被显示为内联元素，元素前后没有换行符。
          margin: 0 auto
          height: 60px
          width: 60px
        .icon-desc
          float: right
          vertical-align: middle
          margin-top: 20px
          right: 0
          height: .44rem
          line-height: .44rem
          text-align: right
          color: $darkTextColor
          ellipsis()
</style>
